﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Pavilion.DesignerTool
{
    public class TrackedAnimationNode : TrackedNodeBase
    {
        private AnimationNode animationNode;
        private Animation originalAnimation;

        public TrackedAnimationNode(AnimationNode animationNode, NodeScript parentNodescript, ResourceItem parentResource) : base(animationNode, parentNodescript, parentResource)
        {
            this.animationNode = animationNode;
            this.originalAnimation = animationNode.Animation;
        }

        public override void TransferDataUpdate()
        {
            base.TransferDataUpdate();

            if (originalAnimation != animationNode.Animation)
                NodeTransfer.UpdateAnimationNode(ParentResource.Name, ParentNodeScript.Name, animationNode);
        }
    }
}
